package com.dfbz.utils;

import java.util.Random;
import java.util.UUID;

public class StrUtil {
    public static String getRandomCode(int num){
        StringBuilder sb = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < num; i++) {
            int r = random.nextInt(10);
            sb.append(r);
        }
        return sb.toString();
    }

    public static String getUUID(){
        UUID uuid = UUID.randomUUID();
        return uuid.toString();
    }
}
